<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ include file="/wesite/view/common/base.jsp" %>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>我的积分</title>
    <%@ include file="/wesite/view/common/common.jsp" %>
</head>
<body>
<div class="my-integral">
    <header class="int-header">
        <a href="javascript:;" class="rule-title fr"><em>?</em>积分规则</a>
        <section class="int-con">
            <aside class="ico-integral fl"></aside>
            <article class="int-con-text fl">
                <p class="text-tit">我的积分</p>
                <p class="text-num"><fmt:formatNumber value="${myIntegral.integral + myIntegral.ly_integral}" type="number"></fmt:formatNumber></p>
            </article>
            <div class="cl"></div>
        </section>
        <section class="int-button">
            <a class="go-sign" href="/we/home/integral-center">
                <p class="txt">每日签到</p>
                <p class="txt2">连续签到有惊喜</p>
            </a>
            <a class="dis-coupon" href="/we/home/integral-center">
                <p class="txt">兑换优惠券</p>
                <p class="txt2">最高可兑50元</p>
            </a>
        </section>
    </header>
    <section class="int-detail">
        <p class="int-detail-title">收支明细</p>
        <ul>
            <c:forEach var="integral" items="${integrals}">
                <li>
                    <article class="fl">
                        <p class="msg-text">${integral.content}</p>
                        <p class="text-time"><fmt:formatDate value="${integral.create_time}"  type="date"></fmt:formatDate></p>
                    </article>
                    <c:choose>
                        <c:when test="${integral.integral >= 0}">
                            <aside class="int-count fr">${integral.integral}</aside>
                        </c:when>
                        <c:otherwise>
                            <aside class="int-count col-blue fr">${integral.integral}</aside>
                        </c:otherwise>
                    </c:choose>

                    <div class="cl"></div>
                </li>
            </c:forEach>
            <%--<li>
                <article class="fl">
                    <p class="msg-text">新用户注册送积分</p>
                    <p class="text-time">2017/6/16</p>
                </article>
                <aside class="int-count fr">+1000000</aside>
                <div class="cl"></div>
            </li>
            <li>
                <article class="fl">
                    <p class="msg-text">新用户注册送积分</p>
                    <p class="text-time">2017/6/16</p>
                </article>
                <aside class="int-count fr">+10</aside>
                <div class="cl"></div>
            </li>
            <li>
                <article class="fl">
                    <p class="msg-text">新用户注册送积分</p>
                    <p class="text-time">2017/6/16</p>
                </article>
                <aside class="int-count fr">+100</aside>
                <div class="cl"></div>
            </li>
            <li>
                <article class="fl">
                    <p class="msg-text">新用户注册送积分</p>
                    <p class="text-time">2017/6/16</p>
                </article>
                <aside class="int-count fr">+1000</aside>
                <div class="cl"></div>
            </li>
            <li>
                <article class="fl">
                    <p class="msg-text">兑换优惠券</p>
                    <p class="text-time">2017/6/16</p>
                </article>
                <aside class="int-count col-blue fr">-10000000</aside>
                <div class="cl"></div>
            </li>--%>

        </ul>

    </section>
</div>
</body>
</html>
